package com.ai.trickycards.ui.adapter

import android.view.LayoutInflater
import android.view.ViewGroup
import androidx.annotation.LayoutRes
import androidx.recyclerview.widget.RecyclerView
import com.ai.trickycards.ui.adapter.BaseViewHolder

abstract class BaseRecyclerAdapter(
    @LayoutRes private val layoutRes: Int
) : RecyclerView.Adapter<BaseViewHolder>() {

    override fun onCreateViewHolder(parent: ViewGroup, viewType: Int): BaseViewHolder {
        val view = LayoutInflater.from(parent.context).inflate(layoutRes, parent, false)
        return BaseViewHolder(view)
    }
}